#include "Core.h"
#include "IChannelManager.h"
#include "SyncAcceptEvent.h"

SyncAcceptEvnt::SyncAcceptEvnt(IMessageSystem::CallBack::OnAccept cb,void* ud,IPumpService* svc)
:m_CallBack(cb),m_pUserData(ud),m_pService(svc)
{}

void SyncAcceptEvnt::Handle(IChannelManager* pManager)
{
	if ( pManager )
	{	
		IMessageChannel* mc = pManager->Create(m_pService);
		m_CallBack(mc,m_pUserData);
	}

	delete this;
}